﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using SelfService.Model.Models;


namespace SelfService.ViewModel.SysPatientLogVMs
{
    public partial class SysPatientLogTemplateVM : BaseTemplateVM
    {
        [Display(Name = "患者")]
        public ExcelPropety Patient_Excel = ExcelPropety.CreateProperty<SysPatientLog>(x => x.PatientId);
        [Display(Name = "身份证号码")]
        public ExcelPropety IdCardNo_Excel = ExcelPropety.CreateProperty<SysPatientLog>(x => x.IdCardNo);
        [Display(Name = "业务")]
        public ExcelPropety Action_Excel = ExcelPropety.CreateProperty<SysPatientLog>(x => x.Action);
        [Display(Name = "金额")]
        public ExcelPropety Amount_Excel = ExcelPropety.CreateProperty<SysPatientLog>(x => x.Amount);
        [Display(Name = "业务时间")]
        public ExcelPropety CreateTime_Excel = ExcelPropety.CreateProperty<SysPatientLog>(x => x.CreateTime);

	    protected override void InitVM()
        {
            Patient_Excel.DataType = ColumnDataType.ComboBox;
            Patient_Excel.ListItems = DC.Set<SysPatient>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysPatientLogImportVM : BaseImportVM<SysPatientLogTemplateVM, SysPatientLog>
    {

    }

}
